//
//  JwMacro.h
//  JwPack
//
//  Created by 陈警卫 on 2022/8/18.
//

#ifndef JwMacro_h
#define JwMacro_h

/// weakObj
#define kJwWeak(name) __weak __typeof(name) w##name = name ;
/// strongObj
#define kJwStrong(name) __strong __typeof(name) s##name = name ;
/// blockObj
#define kJwBlock(name) __block __typeof(name) b##name = name ;

/// DLOG
#if DEBUG
#ifndef DLog
#define DLog(format, args...) \
NSLog(@"[%s:%d]: " format "\n", strrchr(__FILE__, '/') + 1, __LINE__, ## args);
#endif
#else
#ifndef DLog
#define DLog(format, args...) do {} while(0) ;
#endif
#endif

/// MARK: 线程
#define kJw_queueGlobalStart dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

#define kJw_queueMainStart dispatch_async(dispatch_get_main_queue(), ^{

#define kJw_queueStartAfterTime(time) dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(time * NSEC_PER_SEC)), dispatch_get_main_queue(), ^(void){

#define kJw_queueEnd  });


#endif /* JwMacro_h */
